<head>
    <meta charset="utf-8">
    <title>学生信息列表</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<table class="table">
    <caption>学生信息列表 | <a href="/student/create" >添加学生信息</a></caption>

    <thead>
    <tr>
        <th>ID</th>
        <th>用户名</th>
        <th>邮箱地址</th>
        <th>手机号码</th>
        <th>头像</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>

    {foreach $studentlist as $key=>$student }
    <tr>
        <td>{$student.id}</td>
        <td>{$student.username}</td>
        <td>{$student.email}</td>
        <td>{$student.mobile}</td>
        <td>{if $student.img == ''}暂无头像{else /}
            <img style="width: 80px;height: 80px;" src="{$student.img}">
            {/if}
        </td>
        <td><a href="/student/delete/{$student.id}">删除</a>
            <a href="/student/edit/{$student.id}">编辑</a>
        </td>
    </tr>
    {/foreach}
    <tr><td colspan="4">{$studentlist|raw}</td></tr>
    </tbody>
</table>

</body>
</html>